<title>邮件模板编辑</title>
<style>


</style>
<div class="layui-card layadmin-header">
    <div class="layui-breadcrumb" lay-filter="breadcrumb">
        <a lay-href="">主页</a>
        <a><cite>邮件管理</cite></a>
        <a><cite>邮件查看</cite></a>
    </div>
</div>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-card">
            <div class="layui-card-body">
                <div class="layui-form" id="layuiadmin-form-emailTpl"
                     lay-filter="layuiadmin-form-emailTpl">
                    <script type="text/html" template lay-url="/api/admin/email/view/{{ layui.router().search.id }}"
                            lay-done="doEdit(d);">
                        <div class="layui-form-item">
                            <label class="layui-form-label">邮件模板编号</label>
                            <div class="layui-input-block">
                                <input class="layui-input" name="code" value="{{d.data.code}}" type="text" disabled>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">收件人</label>
                            <div class="layui-input-block">
                                <input class="layui-input" name="emailTos" value="{{d.data.emailTos}}" type="text" disabled>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">邮件主题</label>
                            <div class="layui-input-block">
                                <input class="layui-input" name="subject" value="{{ d.data.subject }}" disabled type="text">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">邮件内容</label>
                            <div class="layui-input-block" style="border: 1px solid #eee;padding: 2px;">
                                {{ d.data.content }}
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">发送时间</label>
                            <div class="layui-input-block">
                                <input class="layui-input" disabled name="sendTime"
                                       value="{{d.data.sendTime}}"
                                       type="text">
                            </div>
                        </div>
                        <input class="layui-input" disabled name="oid"
                               value="{{d.data.oid}}"
                               type="hidden">
                    </script>
                </div>

            </div>
        </div>


    </div>
</div>


<script>

    doEdit = function (d) {
        layui.use('email', layui.factory('email')).use(['admin', 'form', 'email'], function () {
            var $ = layui.jquery
                , form = layui.form
                , element = layui.element;
            element.render();
            form.render();


        })
    }


</script>
